package vip.specimen.system.datasource.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * *@Author: 余浪人
 * *@Date：2021/4/7 14:41
 * *@Email:yulangren520@Gmail.com
 * *@QQ:1368419640
 **/
@Getter
@Setter
@Entity
@Table(name = "article_categories")
public class SystemArticleCategoriesEntity extends BaseEntity {
    @ApiModelProperty(value = "分类名称")
    private String categoriesName;
    @ApiModelProperty(value = "排序")
    private Integer sequence = 0;
    @ApiModelProperty(value = "分类关键词")
    private String categoriesKeyword;
    @Column(length = 1024)
    @ApiModelProperty(value = "分类描述")
    private String categoriesDescription;
    @ApiModelProperty(value = "上级分类")
    @ManyToOne
    private SystemArticleCategoriesEntity superior;

    public SystemArticleCategoriesEntity() {
    }

    public SystemArticleCategoriesEntity(String categoriesName, Integer sequence, String categoriesKeyword, String categoriesDescription, SystemArticleCategoriesEntity superior) {
        this.categoriesName = categoriesName;
        this.sequence = sequence;
        this.categoriesKeyword = categoriesKeyword;
        this.categoriesDescription = categoriesDescription;
        this.superior = superior;
    }
}
